package com.ruicar.afs.cloud.bizcommon.algorithm.feign;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.bizcommon.algorithm.entity.AfsCalInputInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.context.annotation.Description;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author yaorui.zhang
 * @version 1.0
 * @Description 算法接口-工具方法
 * @date create on 2020年6月2日11:09:22
 * @since 1.0
 */
@FeignClient(name = "ToolsFeign", url = "${com.greatwall.systems.algorithm-system.url}")
public interface ToolsFeign {

    @Description("获取客户利率方法-四舍五入")
    @GetMapping(value = "/tools/getcustomerrate")
    public JSONObject getcustomerrate(@SpringQueryMap AfsCalInputInfo info, @RequestHeader Map<String, String> headers);

    @Description("计算IRR")
    @GetMapping(value = "/tools/irr")
    public JSONObject irr(@RequestParam("list") String list, @RequestHeader Map<String, String> headers);

    @Description("获取客户利率方法-进位")
    @GetMapping(value = "/tools/getcustomerrateceiling")
    public JSONObject getcustomerrateceiling(@SpringQueryMap AfsCalInputInfo info, @RequestHeader Map<String, String> headers);
}
